public class NewMachineAdapter implements OldMachineInterface {
    private final NewMachineInterface newMachine;

    public NewMachineAdapter(NewMachineInterface newMachine) {
        this.newMachine = newMachine;
    }

    @Override
    public double getSensorData() {
        // 转换新设备的高精度数据为旧系统可处理的格式
        return newMachine.getPrecisionSensorData() * 100;
    }

    @Override
    public void startEngine() {
        // 适配新设备的启动逻辑
        newMachine.initializeSystem();
        newMachine.activateEngine();
    }

    @Override
    public String getStatus() {
        // 转换新设备的状态报告格式
        return "旧系统状态: " + newMachine.getDetailedStatusReport();
    }
}
